package com.example.cart.utils;

import androidx.annotation.NonNull;
import androidx.room.migration.Migration;
import androidx.sqlite.db.SupportSQLiteDatabase;

public class Migration2to3 extends Migration {
    public Migration2to3(int startVersion, int endVersion) {
        super(startVersion, endVersion);
    }

    @Override
    public void migrate(@NonNull SupportSQLiteDatabase supportSQLiteDatabase) {
        if (startVersion == 2 && endVersion == 3) {
            supportSQLiteDatabase.execSQL("create table cart ('id' int primary key,'goods_id' int ,'quantity' int)");

        }
    }
}
